/**
 * 获取event对象
 *
 * @author:Noah Rong
 * @date:2011-05-10
 */
function getEvent (evt) {
    return (evt ? evt : (window.event ? window.event : null));
}

/**
 * 获取event事件源对象
 *
 * @author:Noah Rong
 * @date:2011-05-10
 */
function getEventSrc (evt) {
    return (evt.srcElement ? evt.srcElement : evt.target);
}

/**
 * 获取Event事件对象的方法
 *    同时兼容ie和ff的写法
 *
 * @author:RongWei
 * @date:2011-06-15
 */
function getEvent () {
    if (document.all)   return window.event;
    func = getEvent.caller;
    while (func != null) {
        var arg0 = func.arguments[0];
        if (arg0) {
            if ((arg0.constructor == Event || arg0.constructor == MouseEvent) || (typeof(arg0) == "object" && arg0.preventDefault && arg0.stopPropagation)) {
                return arg0;
            }
        }
        func = func.caller;
    }
    return null;
}


//获取对象属性兼容方法
function getObject(objectId) {
    if (document.getElementById && document.getElementById(objectId)) {
        // W3C DOM
        return document.getElementById(objectId);
    } else if (document.all && document.all(objectId)) {
        // MSIE 4 DOM
        return document.all(objectId);
    } else if (document.layers && document.layers[objectId]) {
        // NN 4 DOM.. note: this won't find nested layers
        return document.layers[objectId];
    } else {
        return false;
    }
}